/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package wrappingdata;

import Wrapper.RuasData;
import Wrapper.Wrapper;

/**
 *
 * @author Putra
 */
public class LazadaWrapper extends Wrapper{
    public static void main(String[] args){
        LazadaWrapper lazadaWrapper = new LazadaWrapper();
        lazadaWrapper.setRootName("LazadaPhoneStore");
        lazadaWrapper.setItemName("SmartPhone");
        lazadaWrapper.setStep(1);
        lazadaWrapper.setXmlFileName("LazadaPhoneStore.xml");
        lazadaWrapper.setBaseUrl("http://www.lazada.co.id/beli-smartphone/?page=#");
        lazadaWrapper.setStartPage(1);
        lazadaWrapper.setLimitPageNumber(131);
        lazadaWrapper.setItemStartMark("<div class=\"product-description\">");
        RuasData normalPrice = new RuasData("<span class=\"product-price-normal\">","</span>");
        normalPrice.setName("NormalPrice");
        RuasData productSale = new RuasData("<div class=\"product-discount\">","</div>");
        productSale.setName("ProductSale");
        RuasData discountPrice = new RuasData("<span class=\"product-price-discount\">","</span>");
        discountPrice.setName("DiscountPrice");
        RuasData title = new RuasData("<a class=\"product-name","</a>");
        title.setName("Title");
        lazadaWrapper.addRuas(normalPrice);
        lazadaWrapper.addRuas(productSale);
        lazadaWrapper.addRuas(discountPrice);
        lazadaWrapper.addRuas(title);
        lazadaWrapper.start();
    }
}
